﻿// MIT License
//
// Copyright (c) 2021-present zuohuaijun, Daming Co.,Ltd and Contributors
//
// 电话/微信：18020030720 QQ群1：87333204 QQ群2：252381476

using Admin.Net.InformationPlatform.Service.Resultful.Dao;
using Furion.DependencyInjection;
using Furion.DynamicApiController;
using Microsoft.AspNetCore.Mvc;
using Nest;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Admin.Net.InformationPlatform.Service.Resultful;


[ApiDescriptionSettings(groups: "Student", Name = "resultful风格测试", Tag = "测试", Order = 200)]
[Route("Student")]
public class StudentService : IDynamicApiController, ITransient
{
  
    [HttpGet("List")]
    public Student GetStudent()
    {

        //...
        return new Student() {Id=1, Name = "张三", Age = 18 };

    }
  
    [HttpPost("Add")]
    public string AddStudent([FromBody] Student student)
    {
        //...
        return "添加成功";
    }

  
    [HttpPut("Update")]
    public string UpdateStudent([FromBody] Student student)
    {
        //...
        return "修改成功";
    }

  
    [HttpDelete("Delete/{id}")]
    public string DeleteStudent( int id)
    {
        //...
        return "删除成功";
    }

}
